
<?php include("header.inc.php") ?>
<?php include("navigation.inc.php")?>       
<?php include("left.inc.php")?>       
<script>
function validate_form(){
	var frm = document.frmContact;
	var email = frm.Email.value;
	var apos=email.indexOf("@");
	var dotpos=email.lastIndexOf(".");
	if(frm.FullName.value == '')
	{
		alert("Mời bạn nhập họ tên!");
		frm.FullName.focus();
		return false;
	}
	if(email == '')
	{
		alert("Mời bạn nhập địa chỉ Email!");
		frm.Email.focus();
		return false;
	}
	else if (apos<1||dotpos-apos<2){
		alert("Địa chỉ Email không đúng định dạng!");
		frm.Email.select();
		return false;
	}
	if(frm.Phone.value == '')
	{
		alert("Bạn chưa nhập số điện thoại!");
		frm.Phone.focus();
		return false;
	}
	if(frm.Subject.value == '')
	{
		alert("Mời bạn nhập tiêu đề bài gửi!");
		frm.Subject.focus();
		return false;
	}
	if(frm.Content.value == '')
	{
		alert("Mời bạn nhập nội dung bài gửi!");
		frm.Content.focus();
		return false;
	}
	
	if ( frm.txt_captcha.value == '')
		{
			alert ("Bạn chưa nhập mã bảo vệ!");
			frm.txt_captcha.focus();
			return false;
		}
	
	return true;
}
</script>

<div id="mainContent" class="grid_7">
   <div class="grid_7 tieudetrang">
    	<p>LIÊN HỆ</p>
    </div>
    <div class="grid_7" id="formlienhe">
    	<table align="left" width="580px" cellpadding="3" cellspacing="10px" border="0" style="text-transform:none;">
			<form action="xulylienhe.php" method="post" name="frmContact" onSubmit="return validate_form()">
            <tr class="row">
				<td align="left" width="24%" style="text-align:left;">Tên đầy đủ<span style="color:#CC3300">*</span>:
				</td>
                <td width="76%" align="left" style="text-align:left"><input type="text" style="width:200px" name="FullName" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left"> Email<span style="color:#CC3300">*</span>:</td>
				<td align="left" style="text-align:left"><input type="text" name="Email" style="width:200px" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left">Số điện thoại<span style="color:#CC3300">*</span>:</td>
				<td align="left" style="text-align:left"><input type="text" style="width:200px" name="Phone" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left"> Số fax</td>
				<td align="left" style="text-align:left"><input type="text" style="width:200px" name="Fax" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left"> Tên công ty</td>
				<td align="left" style="text-align:left"><input type="text" style="width:200px" name="Company" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left"> Tiêu đề<span style="color:#CC3300">*</span>:</td>
				<td align="left" style="text-align:left"><input type="text" style="width:200px" name="Subject" class="contact_text" value=""></td>
			</tr>
			<tr class="row">
				<td align="left" valign="top" style="text-align:left"> Nội dung<span style="color:#CC3300">*</span>:</td>
				<td align="left" style="text-align:left"><textarea name="Content" class="contact_text" style="height:100px; width:300px; font-family:Arial; font-size:12px"></textarea></td>
			</tr>
			<tr class="row">
				<td align="left" style="text-align:left"> Mã bảo vệ<span style="color:#CC3300">*</span>:</td>
				<td align="left" style="text-align:left"><img id="captcha" src="securimage/securimage_show.php" alt="CAPTCHA Image" />
                <input type="text" name="captcha_code" size="10" maxlength="6" />
<a href="#" onclick="document.getElementById('captcha').src = 'securimage/securimage_show.php?' + Math.random(); return false">Ảnh Khác</a>

			</tr>
			<tr class="row">
				<td align="left">&nbsp;</td>
				<td align="left" style="text-align:left"><input type="submit" value="Gửi tin">&nbsp;</td>
			</tr>
            </form>
            
		</table>
    </div>
</div>
     
<?php include("right.inc.php")?>  
<?php include("footer.inc.php")?>  

